﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Automted_Bank_teller
{
    public partial class FeedBack : Form
    {
        public FeedBack()
        {
            InitializeComponent();
        }

        private void FeedBack_Load(object sender, EventArgs e)
        {

        }

        private void BTN_Client_Feedback_Send_Click(object sender, EventArgs e)
        {
            try
            {
            if (RichTxtbox_Client_Feedback.Text.Length > 0)
                {
                    Feedback_Logic feedback = new Feedback_Logic();
                    feedback.GetFeedback(RichTxtbox_Client_Feedback.Text);

                    Feedback_Process Send_Feedback = new Feedback_Process();
                    Send_Feedback.Database_ConnectString();
                    Send_Feedback.Open_Database();
                    Send_Feedback.SendFeedback();
                    Send_Feedback.ExecuteSendQuery();
                    Send_Feedback.Close_Database();
                    MessageBox.Show("Your Feedback Sent Successfully..Thank you");
                }
                else
                {
                    MessageBox.Show("Empty Fields Not Required!");
                }
            }catch(Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }

        private void BTN_Client_Feedback_Cancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
